Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Device Functions / Manipulating View Device Object Properties


GXSetViewDeviceMapping

You can use the GXSetViewDeviceMapping function to assign a mapping to a view device object.

void GXSetViewDeviceMapping(gxViewDevice target, 
                           const gxMapping *map);
target
A reference to the view device object you want to assign the mapping to.
map
A pointer to a mapping structure containing the mapping matrix to assign to the target view device.
DESCRIPTION
The GXSetViewDeviceMapping function copies the mapping structure pointed to by the map parameter into the mapping property of the target view device.

You can specify nil for the map parameter. If you do, the mapping is set to a translation that prevents the view device from overlapping any other view device in the view device's view group. This translation may cause the view device to move to an area adjacent to, but not overlapping, other view devices in this view group.

You can provide arbitrary values for the elements of the mapping structure pointed to by the map parameter, with one exception: the lower-right element of this matrix (element [2][2]) may not be 0.

SPECIAL CONSIDERATIONS
You cannot change the mapping of a view device in the onscreen view group.

ERRORS, WARNINGS, AND NOTICES
Errors 
invalid_viewDevice_reference
viewDevice_access_restricted(debugging version)
SEE ALSO
For an example of the use of this function, see page 7-57.

To retrieve a view device's mapping, use the GXGetViewDeviceMapping function, described in the previous section.

For information about the gxMapping structure, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996